﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using System.Windows.Forms.Integration;
using System.Windows.Forms;

namespace HabitAnalyzer
{
    /// <summary>
    /// Interaction logic for ComparisonReportView.xaml
    /// </summary>
    public partial class ComparisonReportView : Window
    {
        ObservableCollection<SessionActivity> _ActInfo1 = new ObservableCollection<SessionActivity>();
        ObservableCollection<SessionActivity> _ActInfo2 = new ObservableCollection<SessionActivity>();
        public ComparisonReportView(List<SessionActivity> l1, List<SessionActivity> l2, string title)
        {
            InitializeComponent();
            DbUtility db = new DbUtility();
            this.Title = title;
            int i, c1 = l1.Count, c2=l2.Count;
            if (c1 == 0 && c2 == 0)
            {
                label1.Visibility = Visibility.Visible;
                label2.Visibility = Visibility.Hidden;
                label3.Visibility = Visibility.Hidden;
                table.Visibility = Visibility.Hidden;
                listView1.Visibility = Visibility.Hidden;
            }
            for (i = 0; i < c1; i++)
            {
                
                Console.WriteLine("for loop", i);
                _ActInfo1.Add(l1.ElementAt<SessionActivity>(i));
            }
            for (i = 0; i < c2; i++)
            {

                Console.WriteLine("for loop", i);
                _ActInfo2.Add(l2.ElementAt<SessionActivity>(i));
            }
        }
        public ObservableCollection<SessionActivity> ActInfo1
        { get { return _ActInfo1; } }
        public ObservableCollection<SessionActivity> ActInfo2
        { get { return _ActInfo2; } }

        private void ReportWindow_Loaded(object sender, RoutedEventArgs e)
        {
    
        }
    }

}
